// compilar -->  gcc -o tst -O2 -Wall -lssl rand.c

#include <stdlib.h>
#include <stdio.h>
#include <openssl/rand.h>

#define MAX  16

int main ()
{
  int i;
  unsigned char buf[MAX];

  if (RAND_bytes(buf, MAX) == 0)
	{ exit(1); }

  printf("RAND_bytes is --> ");
  for ( i= 0 ; i < MAX ; i++ )
     printf("%02X ", buf[i] & 0x00ff);

  printf("\n");

  return 0;
}

